//带有保险丝熔断机制的同步钩子
//当任务返回字符串就停止往下执行，返回undefined就继续往下执行
const { SyncBailHook } = require('tapable');

const queue = new SyncBailHook(['arg1', 'arg2']);

queue.tap('nodeTask', (arg1, arg2) => {
	console.log('nodeTask', arg1, arg2);
	return '停止往后执行'; //返回字符串就停止往下执行，返回undefined就继续往下执行
});
queue.tap('reactTask', (arg1, arg2) => {
	console.log('reactTask', arg1, arg2);
});

queue.call('111', '222');
